package com.itguigu.controller;

import com.itguigu.pojo.Student;
import com.itguigu.service.IStudentService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Controller;

import java.util.List;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author 哈纳桑
 * @since 2024-04-24
 */

@Controller
public class StudentController {

    @Resource
    private IStudentService studentService;

    public List<Student> getAllStudents() {
        List<Student> all = studentService.getAll();

        System.out.println("最终的学生数据 ：" + all);

        return all;
    }

}
